import type { LoginParams, LoginResult } from '@/types/login'
import { request } from '@/utils/request'

/**
 * 小程序登录
 * @param data 登录参数
 */
export const PostLoginWxMinAPI = (data: LoginParams) => {
  return request<LoginResult>('/login/wxMin', 'POST', data)
}

/**
 * 模拟小程序登录
 */
export const PostLoginWxMinSimpleAPI = (phoneNumber: string) => {
  return request<LoginResult>('/login/wxMin/simple', 'POST', { phoneNumber })
}
